package br.com.delphos.app.factory;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import br.com.delphos.app.factory.interfaces.IFactoryDistribution;

public class DelphosMain {

	private static final String SERVICE_CONTEXT  = "/ctx-delphos-app-service.xml";

	private static final String BUSINESS_CONTEXT = "/ctx-delphos-app-business.xml";

	private static final String FACTORY_CONTEXT  = "/ctx-delphos-app-factory.xml";

	private static final String DATABASE_CONTEXT = "/ctx-delphos-app-database.xml";

	public static void main(String[] args) {

		ApplicationContext context = new ClassPathXmlApplicationContext(BUSINESS_CONTEXT, DATABASE_CONTEXT, FACTORY_CONTEXT, SERVICE_CONTEXT);
		IFactoryDistribution factoryDistribution = context.getBean( IFactoryDistribution.class );

		factoryDistribution.startApplication();
	}

}
